package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ly.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.SaleMarkedCustomerMapper;
import com.ly.heart.domain.SaleMarkedCustomerEntity;
import javax.annotation.Resource;
import com.ly.heart.service.ISaleMarkedCustomerService;

/**
 * 销售报价适合客户/销售Service业务层处理
 * 
 * @author wutao
 * @date 2024-07-15
 */
@Service
public class SaleMarkedCustomerServiceImpl extends ServiceImpl<SaleMarkedCustomerMapper, SaleMarkedCustomerEntity> implements ISaleMarkedCustomerService {

    @Resource
    private SaleMarkedCustomerMapper saleMarkedCustomerMapper;

    /**
     * 查询销售报价适合客户/销售
     * 
     * @param id 销售报价适合客户/销售ID
     * @return 销售报价适合客户/销售
     */
    @Override
    public SaleMarkedCustomerEntity selectSaleMarkedCustomerById(String id)
    {
        return saleMarkedCustomerMapper.selectSaleMarkedCustomerById(id);
    }

    /**
     * 查询销售报价适合客户/销售列表
     * 
     * @param saleMarkedCustomer 销售报价适合客户/销售
     * @return 销售报价适合客户/销售
     */
    @Override
    public List<SaleMarkedCustomerEntity> selectSaleMarkedCustomerList(SaleMarkedCustomerEntity saleMarkedCustomer)
    {
        return saleMarkedCustomerMapper.selectSaleMarkedCustomerList(saleMarkedCustomer);
    }

    /**
     * 新增销售报价适合客户/销售
     * 
     * @param saleMarkedCustomer 销售报价适合客户/销售
     * @return 结果
     */
    @Override
    public int insertSaleMarkedCustomer(SaleMarkedCustomerEntity saleMarkedCustomer)
    {
        saleMarkedCustomer.setCreateTime(DateUtils.getNowDate());
        return saleMarkedCustomerMapper.insertSaleMarkedCustomer(saleMarkedCustomer);
    }

    /**
     * 修改销售报价适合客户/销售
     * 
     * @param saleMarkedCustomer 销售报价适合客户/销售
     * @return 结果
     */
    @Override
    public int updateSaleMarkedCustomer(SaleMarkedCustomerEntity saleMarkedCustomer)
    {
        saleMarkedCustomer.setUpdateTime(DateUtils.getNowDate());
        return saleMarkedCustomerMapper.updateSaleMarkedCustomer(saleMarkedCustomer);
    }

    /**
     * 批量删除销售报价适合客户/销售
     * 
     * @param ids 需要删除的销售报价适合客户/销售ID
     * @return 结果
     */
    @Override
    public int deleteSaleMarkedCustomerByIds(String[] ids)
    {
        return saleMarkedCustomerMapper.deleteSaleMarkedCustomerByIds(ids);
    }

    /**
     * 删除销售报价适合客户/销售信息
     * 
     * @param id 销售报价适合客户/销售ID
     * @return 结果
     */
    @Override
    public int deleteSaleMarkedCustomerById(String id)
    {
        return saleMarkedCustomerMapper.deleteSaleMarkedCustomerById(id);
    }
}
